package conson.tech.manage.activity.service;

import conson.tech.core.response.Response;
import conson.tech.manage.activity.entity.dto.MessagePushDTO;
import conson.tech.manage.activity.entity.dto.SmsSendDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * InterfaceName: MessagePushFeignService
 * Description:
 * Author: HXL
 * Date: 2020/5/28 2:03 下午
 * Version: 1.0
 */
@FeignClient(name="message-center",url = "${message-center.domain:}")
public interface MessagePushFeignService {
    /**
     * 异步推送消息
     * @param messagePushDTO
     * @return
     */
    @PostMapping("/innerAPI/push/async/send")
    Response pushAsyncSend(@RequestBody MessagePushDTO messagePushDTO);

    /**
     * 异步发送短信
     * @param smsSendDTO
     * @return
     */
    @PostMapping(value = "/innerAPI/sms/async/send")
    Response smsAsyncSend(@Valid @RequestBody SmsSendDTO smsSendDTO);

}
